//
//  main.cpp
//  动态内存
//
//  Created by linjinzhu on 2017/7/13.
<<<<<<< HEAD
//  Copyright © 2017年 linjinzhu. All rights reserved.
=======
//  Copyright © 2017年 baidu. All rights reserved.
>>>>>>> 重载。
//

#include <iostream>

using namespace std;

<<<<<<< HEAD
class Box {
public:
    Box() {
        cout << "构造函数" << endl;
    }

    ~Box() {
        cout << "析构函数" << endl;
    }
};

int main(int argc, const char * argv[]) {

    double *point = NULL;// 指针初始化为NULL
    point = new double;// 为变量请求内存

    *point = 100.1;//在分配的地址存储值

    cout << *point << endl;

    delete point;

    // 数组动态内存分配
    char *name = NULL;// 初始化为 null 指针
    name = new char[100];// 为变量请求内存

    delete [] name;

    double** pvalue = NULL;
    pvalue = new double *[4];

    delete pvalue;


    // 对象动态内存分配
    Box *b = NULL;
    b = new Box[10];
    delete [] b;
=======
int main(int argc, const char * argv[]) {


>>>>>>> 重载。

    return 0;
}
